Skip to content

feat: add owner_oidc_refresh_token to coder_workspace_owner data source #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ffais
Copy link

@ffais ffais commented Aug 1, 2024

Add OIDC refresh token to coder_workspace_owner data source, useful to renew access token inside the workspace without restarting it.

@johnstcn
Copy link
Member

@ffais can you run make gen to update the plugin docs? This should help you pass CI.

Signed-off-by: ffais <[email protected]>
@johnstcn
Copy link
Member

@ffais is there a particular reason you need this? Is it not possible to use the coder external-auth access-token command for your use-case? This should get automatically refreshed by Coder.

@ffais
Copy link
Author

ffais commented Aug 12, 2024

The main reason is to use the identity of the user who logged into coder also to authenticate the same on another component, in the most transparent way possible for the user.

Propagating the refresh token within the workspace is the most transparent solution for the workspace user, but as we have already said in pull request #14074, this could,in some scenarios, lead to premature revocation of the token.

As far as I understand, using external auth the user have to perform an additional auth flow to obtain an access token within the workspace. Is this correct?

@johnstcn
Copy link
Member

As far as I understand, using external auth the user have to perform an additional auth flow to obtain an access token within the workspace. Is this correct?

It requires a once-off flow for the user to link their account.

https://coder.com/docs/admin/external-auth#require-git-authentication-in-templates

@johnstcn
Copy link
Member

Based on the conversation in coder/coder#14074 (comment) I think we should close this out. However, if the situation changes, or new information comes to light, please don't hesitate to re-open! Thanks for the contribution in any case!

@johnstcn johnstcn closed this Aug 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants